package com.xuecheng.teaching.service;

import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.dto.WorkCorrectDto;
import com.xuecheng.commons.model.dto.WorkRecordDto;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.WorkCorrectVo;
import com.xuecheng.commons.model.vo.WorkRecordVo;
import com.xuecheng.teaching.domain.WorkRecord;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 作业提交记录 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-12-18
 */
public interface WorkRecordService extends IService<WorkRecord> {

    //提交答案
    ResponseResult submitAnswer(WorkRecordDto workRecordDto);

    //分页+条件查询
    ResponseResult<WorkRecordVo> findByPage(PageRequest pageRequest, String courseName);

    //分页查询提交的作业
    ResponseResult<WorkCorrectVo> workPage(PageRequest pageRequest, Long teachplanId);

    //批改作业
    ResponseResult correctWork(WorkCorrectDto workCorrectDto);

    //获取课程内包含的作业数
    ResponseResult<Integer> getGroupNum(Long coursePubId);
}
